package au.com.betaversion.domain;

import org.springframework.data.neo4j.annotation.EndNode;
import org.springframework.data.neo4j.annotation.GraphId;
import org.springframework.data.neo4j.annotation.RelationshipEntity;
import org.springframework.data.neo4j.annotation.StartNode;

@RelationshipEntity(type = "ACTS_IN")
public class Role {
	
	@GraphId private Long id;

	@EndNode
	private Movie movie;
	
	@StartNode 
	private Actor actor;
	
	private String role;
	
	public Role(Movie movie, String role) {
		super();
		this.movie = movie;
		this.role = role;
	}
	
	public Role(Movie movie, Actor actor, String role) {
		super();
		this.movie = movie;
		this.actor = actor;
		this.role = role;
	}

	public Movie getMovie() {
		return movie;
	}

	public void setMovie(Movie movie) {
		this.movie = movie;
	}

	public Actor getActor() {
		return actor;
	}

	public void setActor(Actor actor) {
		this.actor = actor;
	}

	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	
}
